<template>
    <view class="uni-list-cell wl-list-radius" hover-class="uni-list-cell-hover">
        <view class="uni-media-list" @click="goDetail(value)">
            <view class="uni-media-list-left">
                <image class="uni-media-list-logo" :src="getImgUrl(value.logo,'list')"></image>
                <view class="uni-media-list-left-bottom">
                    <text>会员线路</text>
                </view>
            </view>
            
            <view class="uni-media-list-body">
                <view class="uni-media-list-text-top">
                    <text class="text">{{ value.logistics_name }}</text>
                    <view class="view-left">
                        <image class="image" :src="'/static/home/home_auth.png'"></image>
                        <text class="text">已认证</text>
                    </view>
                    
                </view>
                <!-- <view class="uni-media-list-text-bottom">
                    <block v-for="(item, tIndex) in value.trace_zd" :key="tIndex">
                        {{ item.origin }} > {{ item.destination }}
                        <text></text>
                    </block>
                </view> -->
                <view class="uni-media-list-text-top">
                    <text class="text2">地址:{{value.province}}{{value.city}}{{value.county}}{{value.address }}</text>
                    <!-- <view class="item" @click="orderClick(value)">
                        <text class="text1">下单</text>
                    </view> -->
                    
                </view>
                <view class="uni-media-list-text-top">
                    <text class="text2 text3">联系人：{{value.principal}}</text>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
	data() {
		return {
		};
	},
	props: {
		value: {
			type: Object,
			default: () => {
				return {};
			}
		}
	},
	methods: {
        goDetail(e) {
			console.log(e)
			this.$util.redirectTo('/pages/home/search/company-detail/company-detail', {
				logistics_id: e.logistics_id
			});
		},
		
        getImgUrl(imgStr, type) {
			return this.$util.getImageUrl(imgStr, type);
		},
		orderClick(e){
			// console.log(e)
			 
			// this.$util.redirectTo('/pages/tabBar/delivery/delivery', {
			// 	type:'logistics',
			// 	logistics_id: e.logistics_id,
			// 	logistics_name: e.logistics_name
			// },'reLaunch');
			
			let obj = {
				type:'logistics',
				logistics:e
			}  
			this.$util.redirectTo('/pages/tabBar/delivery/delivery', obj,'reLaunch','obj');
		},
    }
		
};
</script>